/*
2011-2 Programming2 
20092588 Lee ChangMin
2011 / 09 / 28
[Report 3-5]
*/

#include <iostream>

using namespace std; 

void main()
{
	int f;	//factorial val var

	for(int i=1; i<=10; i++)
	{
		f=1;	//var reset
		for(int j=1; j<=i; j++)
		{
			f *= j;
		}
		cout << i << "! = " << f << "\n";	//factorial val output
	}
}